﻿
namespace BEGDC.PreContract.DAL
{
    using System;
    using System.Collections.Generic;
    using Castle.ActiveRecord;
    using NHibernate.Expression;


    [ActiveRecord]
    public partial class ProvinceAssignment : ActiveRecordBase<ProvinceAssignment>
    {
		#region Const Definition
		
		public const string CONST_ProvinceAssignmentID					= "ProvinceAssignmentID";
		public const string CONST_EmployeeID							= "EmployeeID";
		public const string CONST_ProvinceID							= "ProvinceID";

		#endregion
		
        #region Member Variables
        // Primary Key
        private System.Int32 _provinceAssignmentID;
        
        // Non Key

        // Parents
        private Employee _employeeID;
        private Province _provinceID;
        
        
		

        #endregion

        public ProvinceAssignment() {
               
        }
        
        #region Properties
        // Primary Key        
		
		#if (SQLServer)
        [PrimaryKey]
		#else
		[PrimaryKey(PrimaryKeyType.Native, SequenceName = "SEQ_PROVINCEASSIGNMENT_PROVINCEASSIGNMENTID")]
		#endif
        public System.Int32 ProvinceAssignmentID {
            get { return this._provinceAssignmentID; }
            set {  this._provinceAssignmentID = value; }
        }
        
        // Non Key
        
        // Parent Relationships
        [BelongsTo("EmployeeID")]
        public Employee EmployeeID {
            get { return this._employeeID; }
            set { this._employeeID = value; }
        }
        
        [BelongsTo("ProvinceID")]
        public Province ProvinceID {
            get { return this._provinceID; }
            set { this._provinceID = value; }
        }
        
        // Child Relationships
        
		
        #endregion
		
		// Clone
		public ProvinceAssignment Clone()
		{
			ProvinceAssignment newProvinceAssignment = new ProvinceAssignment();
			
            newProvinceAssignment.EmployeeID = this._employeeID ; 
            newProvinceAssignment.ProvinceID = this._provinceID ; 
			return newProvinceAssignment;
		}
    }
}



